/**
 * 相关api
 * 请求方式
 * POSTFORM，POSTJSON，GET POSTFORMBLOB
 */
import * as API from 'szyx-axios'
import {ApiRequest, ApiRequestS, SuccessBase, ErrBase, SuccessNotify, ErrNotify} from '../base/BaseModal'

export default {
  ApiRequest,
  ApiRequestS,
  SuccessBase,
  ErrBase,
  SuccessNotify,
  ErrNotify,
  // 个人证书申请
  doctorSyn: params => {
    return API.POSTJSON('/api/support/doctor/syn', params)
  },
  // 个人证书状态查询
  getUserStatus: params => {
    return API.GET('/api/support/doctor/getUserStatus', params)
  },
  // 发起auth+自动签授权
  oauthRequest: params => {
    return API.GET('/api/support/sign/auth/request', params)
  },
  // 获取用户信息
  userTokenInfo: params => {
    return API.GET('/api/support/sign/auth/tokenInfo', params)
  },
  // 同步签名数据
  signSyn: params => {
    return API.POSTJSON('/api/support/sign/syn', params)
  },
  // 获取签名详情
  getSignInfo: params => {
    return API.GET('/api/support/sign/getSignInfo', params)
  },
  // 医院盖章 同步厂商pdf签名
  devicePdfSign: params => {
    return API.POSTJSON('/api/support/sign/device/pdfSign', params)
  },
  // 同步患者签名pdf
  patientSync: params => {
    return API.GET('/api/support/patient/sign/sync', params)
  },
  // 获取患者pdf签名结果
  getSignResult: params => {
    return API.POSTFORM('/api/support/patient/sign/getResult', params)
  },
  // 获取患者pdf签名结果
  getSignStatus: params => {
    return API.GET('/api/support/sign/getSignStatus', params)
  },
  // auth登出
  selfSignQuit: params => {
    return API.GET('/api/support/sign/selfSign/quit', params)
  }
}
